Skip to content

Conversation

@urso
Copy link
Contributor

@urso urso commented Sep 15, 2025

Add RaidBDev to core module. The RaidBdevs provides us with a more convenient API over having to use low-level SPDK raid_bdev functions throughout the code base.

Note: I have a working Raid0 implementation (MVP) available in my feature-raid0 branch. For context how the changes in here fit in the full implementation see: https://github.com/openebs/mayastor/compare/develop...urso:mayastor:feature-raid0?expand=1

Signed-off-by: Steffen Siering <steffen@xata.io>
@urso urso requested a review from a team as a code owner September 15, 2025 16:46
Comment on lines +44 to +54
impl AsRef<str> for RaidState {
fn as_ref(&self) -> &str {
match self {
RaidState::WaitingForDevices => "waiting for devices",
RaidState::StartingUp => "starting up",
RaidState::Online => "online",
RaidState::Offline => "offline",
RaidState::Unknown => "unknown",
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You can sure strum macros

Comment on lines +70 to +75
/// number of base bdevs discovered and configured
pub discovered: u8,
/// number of base bdevs we expect to be operational (can be less for degraded arrays - depends on raid level)
pub operational: u8,
/// total number of base bdevs comprising the RAID array
pub total: u8,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc comments, should start with Capital and end with .. It would be good if we can follow this, even if at some places it was not followed prior to your changes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants